home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / util / rexx / rmh.lha / RMH / Examples / ai.rexx next >
OS/2 REXX Batch file  |  2001-05-24  |  695b  |  32 lines

  1. /* */
  2.  
  3. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  4.  
  5. ai=AddAppIcon("Prova","ram:disk")
  6. as=AppIconSignal(ai)
  7.  
  8.  
  9. do while 1
  10.     rsig=Wait(or(as,2**12))
  11.     if and(rsig,2**12)~=0 then exit
  12.     if and(rsig,as)~=0 then call handleAI(ai)
  13. end
  14. exit
  15.  
  16. handleAI:
  17. parse arg ai
  18.     handle.wait=0
  19.     num=HandleAppIcon(ai,"HANDLE")
  20.     do i=0 to num-1
  21.         select
  22.             when handle.i.class="DOUBLECLICK" then say "DOUBLECLICK"
  23.             when handle.i.class="DROP" then do
  24.                 say handle.i.dropnum
  25.                 do j=0 to handle.i.dropnum-1
  26.                     say handle.i.name.j handle.i.lock.j
  27.                 end
  28.             end
  29.         end
  30.     end
  31.     return
  32.